import 'package:flutter/cupertino.dart';
import 'package:flutter_li_ke_jie/entity/app_user.dart';
import 'package:flutter_li_ke_jie/utils/sputil.dart';

class MyModel with ChangeNotifier{
  AppUser appUser = AppUser();

  void getAppUserInfo(){
    AppUser? user = SPUtil.getUserInfo();
    if(user!=null){
      appUser = user;
    }
    notifyListeners();
  }

  String vipExpireTimeStr(){
    String? vipExpireTime = appUser.vipExpireTime;
    if(vipExpireTime!=null&&vipExpireTime.isNotEmpty){
      return "VIP过期时间:${vipExpireTime}";
    }
    return "暂未开通VIP";
  }
}